﻿<?xml version="1.0" encoding="utf-8" ?>
<log4net>
  <!-- ConsoleOut is set to be a ConsoleAppender -->
  <appender name="ConsoleOut" type="log4net.Appender.ConsoleAppender">
    <!-- ConsoleAppender uses PatternLayout -->
    <layout type="log4net.Layout.PatternLayout">
      <!-- Print the date in ISO 8601 format -->
      <conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline" />
    </layout>
  </appender>

  <!-- FileOut is set to be a RollingFileAppender -->
  <appender name="FileOut" type="log4net.Appender.RollingFileAppender">
    <file value="ssat.log" />
    <appendToFile value="true" />
    <maximumFileSize value="100KB" />
    <maxSizeRollBackups value="2" />

    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger %ndc - %message%newline" />
    </layout>
  </appender>

  <!-- Set root logger level to DEBUG and its only appender to ConsoleOut -->
  <root>
    <level value="ERROR" />
  </root>

  <!-- Print ERROR,FATAL messages in the package SSATool -->
  <logger name="SSATool">
    <level value="ERROR" />
    <appender-ref ref="FileOut" />
  </logger>
  
  <!-- Print all messages in the package SSATool.UI.View -->
  <logger name="SSATool.UI.View">
    <level value="ALL" />
    <appender-ref ref="ConsoleOut" />
  </logger>

  <!-- Print all messages in the package SSATool.UI.ViewModel -->
  <logger name="SSATool.UI.ViewModel">
    <level value="ALL" />
    <appender-ref ref="ConsoleOut" />
  </logger>

  <!-- Print all messages in the package SSATool.Common.Util -->
  <logger name="SSATool.Common.Util">
    <level value="ALL" />
  </logger>
  
  <!-- Print all messages in the package SSATool.BL.DM -->
  <logger name="SSATool.BL.DM">
    <level value="ALL" />
    <appender-ref ref="ConsoleOut" />
  </logger>
</log4net>